﻿'<Get Linux is a open source lightweight download client for operating systems.>
'    Copyright (C) <2014>  <Dev-fire>

'    This program is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 3 of the License, or
'    (at your option) any later version.

'    This program is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.

'    You should have received a copy of the GNU General Public License
'    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Public Class About
    'Website
    Private Sub Button_Website_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Website.Click
        Main.NotifyIcon_Main.BalloonTipText = "Opening project's website."
        Main.NotifyIcon_Main.ShowBalloonTip(1500)
        Try
            Process.Start("http://getlinux.sourceforge.net")
        Catch Ex As Exception
            MsgBox(Ex.Message, MsgBoxStyle.Critical)
        End Try
    End Sub
    'Project Page
    Private Sub Button_Project_Page_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Project_Page.Click
        Main.NotifyIcon_Main.BalloonTipText = "Opening project's page on sourceforge."
        Main.NotifyIcon_Main.ShowBalloonTip(1500)
        Try
            Process.Start("https://sourceforge.net/projects/getlinux/")
        Catch Ex As Exception
            MsgBox(Ex.Message, MsgBoxStyle.Critical)
        End Try
    End Sub
    'Close
    Private Sub PictureBox_Close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox_Close.Click
        Close()
    End Sub
    'Move Window - Panel
    Private Sub Panel_Main_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel_Main.MouseDown
        If e.Button = Windows.Forms.MouseButtons.Left Then
            Panel_Main.Capture = False
            Const WM_NCLBUTTONDOWN As Integer = &HA1S
            Const HTCAPTION As Integer = 2
            Dim msg As Message = Message.Create(Me.Handle, WM_NCLBUTTONDOWN, New IntPtr(HTCAPTION), IntPtr.Zero)
            Me.DefWndProc(msg)
        End If
    End Sub
    'Move Window - Label Title
    Private Sub Label_Title_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label_Title.MouseDown
        If e.Button = Windows.Forms.MouseButtons.Left Then
            Label_Title.Capture = False
            Const WM_NCLBUTTONDOWN As Integer = &HA1S
            Const HTCAPTION As Integer = 2
            Dim msg As Message = Message.Create(Me.Handle, WM_NCLBUTTONDOWN, New IntPtr(HTCAPTION), IntPtr.Zero)
            Me.DefWndProc(msg)
        End If
    End Sub
    'Button Project Page MouseHover
    Private Sub Button_Project_Page_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Project_Page.MouseHover
        Button_Project_Page.FlatAppearance.BorderColor = Color.SteelBlue
    End Sub
    'Button Project Page MouseLeave
    Private Sub Button_Project_Page_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Project_Page.MouseLeave
        Button_Project_Page.FlatAppearance.BorderColor = Panel_Main.BackColor
    End Sub
    'Button Website MouseHover
    Private Sub Button_Website_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Website.MouseHover
        Button_Website.FlatAppearance.BorderColor = Color.SteelBlue
    End Sub
    'Button Website MouseLeave
    Private Sub Button_Website_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Website.MouseLeave
        Button_Website.FlatAppearance.BorderColor = Panel_Main.BackColor
    End Sub
    'Close Red
    Private Sub About_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        PictureBox_Close.Image = My.Resources.Close_Red
    End Sub
    'Close Grey
    Private Sub About_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate
        PictureBox_Close.Image = My.Resources.Close_Grey
    End Sub
End Class